package com.hh.entity.enums;

import lombok.Getter;

/**
 * com.hh.entity.enums
 *
 * @author
 * @version 0.0.1
 * @date 2025/6/4
 **/
@Getter
public enum MessageType {
    SYSTEM_NOTICE("系统通知", 1),
    INFO("信息", 2),
    NOTICE("通知", 3);

    private final String text;

    private final int value;

    MessageType(String text, int value) {
        this.text = text;
        this.value = value;
    }

    public static MessageType getEnumByValue(int value) {
        for (MessageType messageType : MessageType.values()) {
            if (messageType.getValue() == value) {
                return messageType;
            }
        }
        return null;
    }
}